<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>全屏时钟</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            background-color: #000;
            color: #fff;
            font-family: 'Arial', sans-serif;
            height: 100vh;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            position: relative;
        }
        
        /* 装饰元素 */
        .decoration {
            position: absolute;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 50%;
        }
        
        .decoration:nth-child(1) {
            width: 300px;
            height: 300px;
            animation: rotate 30s linear infinite;
        }
        
        .decoration:nth-child(2) {
            width: 500px;
            height: 500px;
            animation: rotate 45s linear infinite reverse;
        }
        
        .decoration:nth-child(3) {
            width: 700px;
            height: 700px;
            animation: rotate 60s linear infinite;
        }
        
        @keyframes rotate {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        /* 时间显示 */
        .time-container {
            position: relative;
            z-index: 10;
            text-align: center;
            padding: 20px;
        }
        
        .time {
            font-size: 12vw;
            font-weight: 300;
            letter-spacing: -3px;
            margin-bottom: 10px;
            text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
        }
        
        .seconds {
            display: inline-block;
            width: 1.5em;
            text-align: left;
            color: #4ecdc4;
            font-weight: 400;
        }
        
        /* 日期显示 */
        .date-container {
            margin-top: 20px;
            text-align: center;
            position: relative;
            z-index: 10;
        }
        
        .solar-date {
            font-size: 2.5vw;
            margin-bottom: 15px;
            color: #f0f0f0;
            letter-spacing: 1px;
        }
        
        .lunar-date {
            font-size: 2vw;
            color: #4ecdc4;
            background: rgba(78, 205, 196, 0.1);
            padding: 8px 20px;
            border-radius: 30px;
            display: inline-block;
        }
        
        /* 底部信息 */
        .footer {
            position: fixed;
            bottom: 20px;
            width: 100%;
            text-align: center;
            font-size: 14px;
            color: rgba(255, 255, 255, 0.5);
            z-index: 10;
        }
        
        /* 响应式调整 */
        @media (max-width: 768px) {
            .time {
                font-size: 20vw;
            }
            
            .solar-date {
                font-size: 5vw;
            }
            
            .lunar-date {
                font-size: 4vw;
            }
        }
    </style>
</head>
<body>
    <!-- 装饰元素 -->
    <div class="decoration"></div>
    <div class="decoration"></div>
    <div class="decoration"></div>
    
    <div class="time-container">
        <div class="time">
            <span id="hours">00</span>:<span id="minutes">00</span>:<span id="seconds" class="seconds">00</span>
        </div>
    </div>
    
    <div class="date-container">
        <div class="solar-date" id="solar-date"></div>
        <div class="lunar-date" id="lunar-date"></div>
    </div>
    
    <div class="footer" id="hitokoto">
        一言加载中......
    </div>

    <script>
        function getLunarDate(date) {
            // 农历月份名称
            const lunarMonths = [
                "正月", "二月", "三月", "四月", "五月", "六月", 
                "七月", "八月", "九月", "十月", "冬月", "腊月"
            ];
            
            // 农历日期名称
            const lunarDays = [
                "初一", "初二", "初三", "初四", "初五", "初六", "初七", "初八", "初九", "初十",
                "十一", "十二", "十三", "十四", "十五", "十六", "十七", "十八", "十九", "二十",
                "廿一", "廿二", "廿三", "廿四", "廿五", "廿六", "廿七", "廿八", "廿九", "三十"
            ];
            
            // 生肖
            const zodiacs = [
                "鼠", "牛", "虎", "兔", "龙", "蛇", "马", "羊", "猴", "鸡", "狗", "猪"
            ];
            
            // 天干
            const heavenlyStems = ["甲", "乙", "丙", "丁", "戊", "己", "庚", "辛", "壬", "癸"];
            // 地支
            const earthlyBranches = ["子", "丑", "寅", "卯", "辰", "巳", "午", "未", "申", "酉", "戌", "亥"];
            
            const year = date.getFullYear();
            const month = date.getMonth();
            const day = date.getDate();
            
            // 计算农历年份（简化方法）
            const lunarYear = year;
            const stemIndex = (lunarYear - 4) % 10;
            const branchIndex = (lunarYear - 4) % 12;
            const zodiac = zodiacs[(lunarYear - 4) % 12];
            
            // 模拟农历日期
            const lunarMonth = lunarMonths[month];
            const lunarDay = lunarDays[(day - 1) % 30];
            
            return `农历 ${heavenlyStems[stemIndex]}${earthlyBranches[branchIndex]}${zodiac}年 ${lunarMonth}${lunarDay}`;
        }
        
        // 更新时间和日期
        function updateDateTime() {
            const now = new Date();
            
            // 更新时间
            document.getElementById('hours').textContent = now.getHours().toString().padStart(2, '0');
            document.getElementById('minutes').textContent = now.getMinutes().toString().padStart(2, '0');
            document.getElementById('seconds').textContent = now.getSeconds().toString().padStart(2, '0');
            
            // 更新公历日期
            const options = { year: 'numeric', month: 'long', day: 'numeric', weekday: 'long' };
            const solarDateStr = now.toLocaleDateString('zh-CN', options);
            document.getElementById('solar-date').textContent = solarDateStr;
            
            // 更新农历日期
            document.getElementById('lunar-date').textContent = getLunarDate(now);
        }

        function updateHitokotoText() {
            fetch('https://v1.hitokoto.cn')
                .then(response => response.json())
                .then(data => {
                const hitokoto = document.querySelector('#hitokoto')
                hitokoto.href = `https://hitokoto.cn/?uuid=${data.uuid}`
                hitokoto.innerText = data.hitokoto
                })
                .catch(console.error)
        }
        
        // 初始化
        updateDateTime();
        updateHitokotoText();
        setInterval(updateDateTime, 1000);
        setInterval(updateHitokotoText, 300000);
        
        // 全屏功能
        document.addEventListener('keydown', function(event) {
            if (event.key === 'f' || event.key === 'F') {
                toggleFullScreen();
            }
        });
        
        function toggleFullScreen() {
            if (!document.fullscreenElement) {
                document.documentElement.requestFullscreen();
            } else {
                if (document.exitFullscreen) {
                    document.exitFullscreen();
                }
            }
        }
        
        // 点击页面也可以切换全屏
        document.addEventListener('click', toggleFullScreen);
    </script>

</body>
</html>